static createElement(parentElement: HTMLElement, fullPath: string, _document: { createElement(tag: string): HTMLElement; }): HTMLElement { element = StorageAccess.createElement(this._parentElement, fullPath, this._document);
this._byName[fullPath] = element;
for (var p in updateProperties) if (updateProperties.hasOwnProperty(p)) { var v = updateProperties[p];
var attrName = 'tp-' + encodeForAttributeName(p);
element.removeAttribute(attrName);
element.setAttribute(attrName, v);
this._parentElement.setAttribute('data-teapo-file-count', <any>this._parentElement.children.length); this._parentElement.setAttribute('data-edited-utc', <any>timestamp); callback: (error: Error, byFullPath: PropertiesByFullPath) => void): void { var byFullPath: PropertiesByFullPath = {}; if (fullPaths === null || typeof fullPaths === 'undefined') { for (var fullPath in this._byName) if (this._byName.hasOwnProperty(fullPath)) { var element = this._getExistingElement(fullPaths[i]);
var propBag = this._readFileProperties(element);
byFullPath[fullPaths[i]] = propBag;
for (var i = 0; i < fullPaths.length; i++) { var element = this._getExistingElement(fullPaths[i]);
var propBag = element ? this._readFileProperties(element) : null;
byFullPath[fullPaths[i]] = propBag;
callback(null, byFullPath);
private _readFileProperties(element: HTMLElement) { var properties: { [property: string]: string; } = {}; for (var i = 0; i < element.attributes.length; i++) { var attr = element.attributes.item(i);
if (!startsWith(attr.name.toLowerCase(), 'tp-')) continue;
var propertyName = decodeFromAttributeName(attr.name.slice(3 ));
properties[propertyName] = attr.value;